<template>
    <div class="child">
        <h3>我是child</h3>
        {{sum}}
    </div>
</template>

<script>
    import { ref } from 'vue';
    export default {
        name: "Child",
        setup(){
            let sum = ref(0);

            return new Promise(()=>{
                setTimeout((resolve,reject) => {
                    resolve({sum});
                }, 1000);
            })
        }
    }
</script>

<style>
    .child{
        background-color: skyblue;
        padding: 10px;
    }
</style>